/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package fr.p10.miage.gestionabsence.model;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 *
 * @author yousim
 */
public class Agenda {

    private int idCr;
    private int idP;
    private int idS;
    private int idEc;
    private int idI;
    private int idJ;
    private int debut;
    private int fin;
    private int numG;
    private String typeE;
    private String valide;
    private String visible;

    public Agenda() {
            
    }

    public Agenda(int idCr, int idP, int idS, int idEc, int idI, int idJ, int debut, int fin, int numG, String typeE, String valide, String visible) {
        this.idCr = idCr;
        this.idP = idP;
        this.idS = idS;
        this.idEc = idEc;
        this.idI = idI;
        this.idJ = idJ;
        this.debut = debut;
        this.fin = fin;
        this.numG = numG;
        this.typeE = typeE;
        this.valide = valide;
        this.visible = visible;
    }

    public int getDebut() {
        return debut;
    }

    public void setDebut(int debut) {
        this.debut = debut;
    }

    public int getFin() {
        return fin;
    }

    public void setFin(int fin) {
        this.fin = fin;
    }

    public int getIdCr() {
        return idCr;
    }

    public void setIdCr(int idCr) {
        this.idCr = idCr;
    }

    public int getIdEc() {
        return idEc;
    }

    public void setIdEc(int idEc) {
        this.idEc = idEc;
    }

    public int getIdI() {
        return idI;
    }

    public void setIdI(int idI) {
        this.idI = idI;
    }

    public int getIdJ() {
        return idJ;
    }

    public void setIdJ(int idJ) {
        this.idJ = idJ;
    }

    public int getIdP() {
        return idP;
    }

    public void setIdP(int idP) {
        this.idP = idP;
    }

    public int getIdS() {
        return idS;
    }

    public void setIdS(int idS) {
        this.idS = idS;
    }

    public int getNumG() {
        return numG;
    }

    public void setNumG(int numG) {
        this.numG = numG;
    }

    public String getTypeE() {
        return typeE;
    }

    public void setTypeE(String typeE) {
        this.typeE = typeE;
    }

    public String getValide() {
        return valide;
    }

    public void setValide(String valide) {
        this.valide = valide;
    }

    public String getVisible() {
        return visible;
    }

    public void setVisible(String visible) {
        this.visible = visible;
    }

    public void init(ResultSet resultat) throws SQLException{
        this.idCr = resultat.getInt("IDCR");
        this.idP = resultat.getInt("IDP");
        this.idS = resultat.getInt("IDS");
        this.idEc = resultat.getInt("IDEC");
        this.idI = resultat.getInt("IDI");
        this.idJ = resultat.getInt("IDJ");
        this.debut = resultat.getInt("DEBUT");
        this.fin = resultat.getInt("FIN");
        this.numG = resultat.getInt("NUMG");
        this.typeE = resultat.getString("TYPEE");
        this.valide = resultat.getString("VALIDE");
        this.visible = resultat.getString("VISIBLE");
    }
}
